import { createRouter, createWebHashHistory } from "vue-router";
import Login from '../views/Login.vue'
import Register from '../views/Register.vue'
import StudentManage from '../views/StudentManage.vue'
import ChangePassword from '../views/ChangePassword.vue'
import DormitoryManage from '../views/DormitoryManage.vue'
import LiveManage from '../views/LiveManage.vue'
import FloorManage from '../views/FloorManage.vue'
import Index from '../views/Index.vue'
const routes = [
    {
        path: '/',
        component: Login,
        redirect: '/login'
    },
    {
        path: '/index',
        name: 'index',
        component: Index
    },
    {
        path: '/login',
        name: 'login',
        component: Login
    },
    {
        path: '/register',
        name: 'register',
        component: Register
    },
    {
        path: '/changepassword',
        name: 'changepassword',
        component: ChangePassword
    },
    {
        path: '/studentmanage',
        name: 'studentmanage',
        component: StudentManage
    },
    {
        path: '/dormitorymanage',
        name: 'dormitorymanage',
        component: DormitoryManage
    },
    {
        path: '/livemanage',
        name: 'livemanage',
        component: LiveManage
    },
    {
        path: '/floormanage',
        name: 'floormanage',
        component: FloorManage
    },
]
const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router